package com.owen.server;

import com.owen.util.GetMapUtil;
import com.owen.util.HtmlToPdf;

import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;

public class ExportFile {

    // 日志
    private static final Logger logger = Logger.getLogger(ExportFile.class.getName());

    /**
     * 导出文件
     */
    public void Export(){
        Map<String, String> load = new GetMapUtil().getMap();
        int total = load.size();
        int count = 0;
        Set<String> keySet = load.keySet();
        for (String s : keySet) {
            HtmlToPdf.convert(load.get(s), s);
            logger.info(++count + "/" + total);
        }
    }
}
